package com.lingyu.jsjx.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lingyu.jsjx.mapper.TeacherPeerEvaluationMapper;
import com.lingyu.jsjx.domain.TeacherPeerEvaluation;
import com.lingyu.jsjx.service.ITeacherPeerEvaluationService;

/**
 * 同行评价Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
@Service
public class TeacherPeerEvaluationServiceImpl  extends ServiceImpl<TeacherPeerEvaluationMapper, TeacherPeerEvaluation> implements ITeacherPeerEvaluationService
{
    @Autowired
    private TeacherPeerEvaluationMapper teacherPeerEvaluationMapper;

    /**
     * 查询同行评价
     * 
     * @param peerEvalId 同行评价主键
     * @return 同行评价
     */
    @Override
    public TeacherPeerEvaluation selectTeacherPeerEvaluationByPeerEvalId(Long peerEvalId)
    {
        return teacherPeerEvaluationMapper.selectTeacherPeerEvaluationByPeerEvalId(peerEvalId);
    }

    /**
     * 查询同行评价列表
     * 
     * @param teacherPeerEvaluation 同行评价
     * @return 同行评价
     */
    @Override
    public List<TeacherPeerEvaluation> selectTeacherPeerEvaluationList(TeacherPeerEvaluation teacherPeerEvaluation)
    {
        return teacherPeerEvaluationMapper.selectTeacherPeerEvaluationList(teacherPeerEvaluation);
    }

    /**
     * 新增同行评价
     * 
     * @param teacherPeerEvaluation 同行评价
     * @return 结果
     */
    @Override
    public int insertTeacherPeerEvaluation(TeacherPeerEvaluation teacherPeerEvaluation)
    {
        return baseMapper.insert(teacherPeerEvaluation);
    }

    /**
     * 修改同行评价
     * 
     * @param teacherPeerEvaluation 同行评价
     * @return 结果
     */
    @Override
    public int updateTeacherPeerEvaluation(TeacherPeerEvaluation teacherPeerEvaluation)
    {

        return baseMapper.updateById(teacherPeerEvaluation);
    }

    /**
     * 批量删除同行评价
     * 
     * @param peerEvalIds 需要删除的同行评价主键
     * @return 结果
     */
    @Override
    public int deleteTeacherPeerEvaluationByPeerEvalIds(Long[] peerEvalIds)
    {
        return teacherPeerEvaluationMapper.deleteTeacherPeerEvaluationByPeerEvalIds(peerEvalIds);
    }

    /**
     * 删除同行评价信息
     * 
     * @param peerEvalId 同行评价主键
     * @return 结果
     */
    @Override
    public int deleteTeacherPeerEvaluationByPeerEvalId(Long peerEvalId)
    {
        return baseMapper.deleteById(peerEvalId);
    }
}
